package cn.sofwin.day0107.homework;

import java.util.Scanner;

public class Lottery {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        boolean result = judge();
        System.out.println("是否为幸运用户：" + result);



    }
    static  boolean judge(){
        System.out.println("请输入会员号：");
        int number = sc.nextInt();
        int luckNumber = (int)(Math.random()*10);
        int bNumber = number/100%10;

        System.out.println("幸运数字为：" + luckNumber + bNumber);
        if(luckNumber == bNumber){
            return true;
        }else {
            return false;
        }
    }
}
